package com.easyJava.bean;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * @author ZhangYK
 * @version 8.0
 * @title TableInfo
 * @description
 * @create 2024/11/14 12:50
 */
public class TableInfo {
    /**
     * 表名
     */
    private String tableName;

    /**
     * bean 名称
     */
    private String beanName;

    /**
     * 参数名称
     */
    private String beanParamName;

    /**
     * 表注释
     */
    private String comment;

    /**
     * 字段信息
     */
    private List<FieldInfo> fieldList;

    /**
     * 唯一索引集合
     */
    private Map<String,List<FieldInfo>> keyIndexInfo = new LinkedHashMap<>();

    /**
     * 是否有date类型
     */
    private Boolean hasDate = false;

    /**
     * 是否有时间类型
     */
    private Boolean hasDateTime = false;

    /**
     * 是否有BigDecimal类型
     */
    private Boolean hasBigDecimal = false;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getBeanName() {
        return beanName;
    }

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    public String getBeanParamName() {
        return beanParamName;
    }

    public void setBeanParamName(String beanParamName) {
        this.beanParamName = beanParamName;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public List<FieldInfo> getFieldList() {
        return fieldList;
    }

    public void setFieldList(List<FieldInfo> fieldList) {
        this.fieldList = fieldList;
    }

    public Map<String, List<FieldInfo>> getKeyIndexInfo() {
        return keyIndexInfo;
    }

    public void setKeyIndexInfo(Map<String, List<FieldInfo>> keyIndexInfo) {
        this.keyIndexInfo = keyIndexInfo;
    }

    public Boolean getHasDate() {
        return hasDate;
    }

    public void setHasDate(Boolean hasDate) {
        this.hasDate = hasDate;
    }

    public Boolean getHasDateTime() {
        return hasDateTime;
    }

    public void setHasDateTime(Boolean hasDateTime) {
        this.hasDateTime = hasDateTime;
    }

    public Boolean getHasBigDecimal() {
        return hasBigDecimal;
    }

    public void setHasBigDecimal(Boolean hasBigDecimal) {
        this.hasBigDecimal = hasBigDecimal;
    }

    @Override
    public String toString() {
        return "TableInfo{" +
                "tableName='" + tableName + '\'' +
                ", beanName='" + beanName + '\'' +
                ", beanParamName='" + beanParamName + '\'' +
                ", comment='" + comment + '\'' +
                ", fieldList=" + fieldList +
                ", keyIndexInfo=" + keyIndexInfo +
                ", hasDate=" + hasDate +
                ", hasDateTime=" + hasDateTime +
                ", hasBigDecimal=" + hasBigDecimal +
                '}';
    }
}
